package br.com.knowledge.persistence.hibernate.entities;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * VisItemvisaoId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class VisItemvisaoId implements java.io.Serializable {

	// Fields
	private Integer id;
	private Integer cadUsuarioId;
	private Integer cadVisaoId;

	
	// Constructors

	/** default constructor */
	public VisItemvisaoId() {
	}

	/** full constructor */
	public VisItemvisaoId(Integer id, Integer cadUsuarioId, Integer cadVisaoId) {
		this.id = id;
		this.cadUsuarioId = cadUsuarioId;
		this.cadVisaoId = cadVisaoId;
	}

	// Property accessors

	@Column(name = "id", nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "cad_usuario_id", nullable = false)
	public Integer getCadUsuarioId() {
		return this.cadUsuarioId;
	}

	public void setCadUsuarioId(Integer cadUsuarioId) {
		this.cadUsuarioId = cadUsuarioId;
	}

	@Column(name = "cad_visao_id", nullable = false)
	public Integer getCadVisaoId() {
		return this.cadVisaoId;
	}

	public void setCadVisaoId(Integer cadVisaoId) {
		this.cadVisaoId = cadVisaoId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof VisItemvisaoId))
			return false;
		VisItemvisaoId castOther = (VisItemvisaoId) other;

		return ((this.getId() == castOther.getId()) || (this.getId() != null
				&& castOther.getId() != null && this.getId().equals(
				castOther.getId())))
				&& ((this.getCadUsuarioId() == castOther.getCadUsuarioId()) || (this
						.getCadUsuarioId() != null
						&& castOther.getCadUsuarioId() != null && this
						.getCadUsuarioId().equals(castOther.getCadUsuarioId())))
				&& ((this.getCadVisaoId() == castOther.getCadVisaoId()) || (this
						.getCadVisaoId() != null
						&& castOther.getCadVisaoId() != null && this
						.getCadVisaoId().equals(castOther.getCadVisaoId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getId() == null ? 0 : this.getId().hashCode());
		result = 37
				* result
				+ (getCadUsuarioId() == null ? 0 : this.getCadUsuarioId()
						.hashCode());
		result = 37
				* result
				+ (getCadVisaoId() == null ? 0 : this.getCadVisaoId()
						.hashCode());
		return result;
	}

}